cpu_gdt_init() could allocate a frame array one element too small. Now
it is fixed size and guaranteed big enough. Spotted by George Dunlap.
Signed-off-by: Keir Fraser <keir@xensource.com>
void __init cpu_gdt_init(struct Xgt_desc_struct *gdt_descr)
{
- unsigned long frames[gdt_descr->size >> PAGE_SHIFT];
+ unsigned long frames[16];
unsigned long va;
int f;
void __init cpu_gdt_init(struct desc_ptr *gdt_descr)
{
- unsigned long frames[gdt_descr->size >> PAGE_SHIFT];
+ unsigned long frames[16];
unsigned long va;
int f;